<?php $this->headStyle()->captureStart()?>
    #content td { padding:5px}
    #content table { border:1px #aaa solid; padding:5px; width:100%}
    #content th {font-weight:bold;}
<?php $this->headStyle()->captureEnd()?>

<table id="attribute">
    <tr>
        <th>Listing</th>
        <td><a href="<?php echo $this->sanity->listing->url()?>" target="_blank"><?php echo $this->sanity->listing->title?></a></td>
    </tr>
</table>

<?php $count = count($this->sanity->errors);?>
<?php if ($count != 0):?>
<table border="1" id="listings">
    <?php foreach ($this->sanity->errors as $k => $errors):?>
    <tr>
        <th style="width:50px"><?php echo $k?></th>    
        <td>
            <ul>
                <?php foreach ((array)$errors as $error):?>
                    <li><?php echo $error?>
						<?php
						if($k == 'photo'){
							echo ' | <a href="'.$this->geturl('display', 'sanity', null, 'admin1', array('id'=> $_GET['id'], 'fix'=> 'photo')).'">Fix</a>';
						}
						?>
					</li>
                <?php endforeach;?>
            </ul>
        </td>
    </tr>
    <?php endforeach;?>
</table>
<?php endif;?>
